package collection.list;

/**
 * 仿写LinkedList双层链表
 */
public class Demo03MyLinkedList {
    public static void main(String[] args) {
        MyLinkedList<Integer> myLinkedList = new MyLinkedList<>();
        myLinkedList.add(1);
        myLinkedList.add(2);
        myLinkedList.add(3);
        myLinkedList.add(4);
        myLinkedList.add(5);
        myLinkedList.add(6);
        System.out.println(myLinkedList);

//        myLinkedList.deleteFirst();
//        System.out.println(myLinkedList);

//        myLinkedList.deleteLast();
//        System.out.println(myLinkedList);


        myLinkedList.delete(2);
        System.out.println(myLinkedList);

//        myLinkedList.update(2, 10);
//        System.out.println(myLinkedList);

//        System.out.println(myLinkedList.getByIndex(5));
    }
}
